package create.builder;

public class Director {
    private BaseBuilder builder;

    public Director(BaseBuilder builder) {
        this.builder = builder;
    }

    public Car construct(){
        //构造的顺序是可以发生变化的
        builder.buildFrame();
        builder.buildTire();
        builder.buildGlass();

        return builder.buildCar();
    }
}
